<template>
	<process-frame
		:error="error" 
		:errorMsg="errorMsg" 
		:errorBtn="false" 
	>
		<web-view :src="jumpUrl"></web-view>
	</process-frame>
</template>

<script>
	const app = getApp()
	
	export default {
		data() {
			return {
				error: false,
				errorMsg: '',
				jumpUrl: ''
			}
		},
		onLoad(options) {
			this.$wxSdkUtil.init(null, { hideShare: true })
			if (!options.url && !app.globalData.webviewUrl) {
				this.error = true
				this.errorMsg = '缺少必要参数，无法加载页面'
			} else {
				this.jumpUrl = options.url ? decodeURIComponent(options.url) : app.globalData.webviewUrl
			}
			app.globalData.webviewUrl = ''
		}
	}
</script>

<style>
</style>
